package io.renren.modules.user.controller;

import io.renren.common.utils.R;
import io.renren.modules.user.vo.UserVo;
import io.renren.modules.user.openfeign.UserOpenFeignService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * @author 李涛
 * @date 2020-08-18 14:38
 */
@RestController
@RequestMapping("/user")
public class UserController {
    @Autowired
    private UserOpenFeignService userOpenFeignService;

    @RequestMapping("/list")
    public R list(@RequestParam Map<String,Object> params){
        return userOpenFeignService.list(params);
    }
    @RequestMapping("/updateuserstatus")
    public R updateUserStatus(@RequestBody UserVo sysUser){
        return userOpenFeignService.userStatus(sysUser);
    }
    @RequestMapping("/updateperms")
    public R updatePerms(@RequestBody UserVo userVo){
        return userOpenFeignService.updatePerms(userVo);
    }
}
